package com.zhangzeqin.code.service.Impl;

import com.zhangzeqin.code.dao.Impl.WordDaoImpl;
import com.zhangzeqin.code.dao.WordDao;
import com.zhangzeqin.code.service.WordService;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public class WordServiceImpl implements WordService {

    WordDao wordDao=new WordDaoImpl();
    @Override
    public boolean addWord(String wordBook, String word, String meaning) {
        return wordDao.addWord(wordBook, word, meaning);
    }
    @Override
    public boolean deleteWord(String wordBook, String word) {
        return wordDao.deleteWord(wordBook,word);
    }

    @Override
    public boolean modifyWord(String wordBook, String meaning, String word) {
        return wordDao.modifyWord(wordBook,meaning,word);
    }

    @Override
    public List<Map> checkWord(String wordBook, String word, String meaning) throws SQLException {
        return wordDao.checkWord(wordBook,word,meaning);
    }
}
